﻿Imports System.Data.SqlClient
Imports MySql.Data.MySqlClient

Public Class frmNhaCungCap
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents btnNew As System.Windows.Forms.Button
    Friend WithEvents btnSave As System.Windows.Forms.Button
    Friend WithEvents btnDelete1 As System.Windows.Forms.Button
    Friend WithEvents BtnClose As System.Windows.Forms.Button
    Friend WithEvents BtnIn As System.Windows.Forms.Button
    Friend WithEvents TxtFax As System.Windows.Forms.TextBox
    Friend WithEvents TxtDienThoai As System.Windows.Forms.TextBox
    Friend WithEvents txtTen_NganHang As System.Windows.Forms.TextBox
    Friend WithEvents txtDiaChi As System.Windows.Forms.TextBox
    Friend WithEvents txtTen_KH As System.Windows.Forms.TextBox
    Friend WithEvents txtMa_KH As System.Windows.Forms.TextBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
    Friend WithEvents DiachiDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents MakhachhangDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents TenkhachhangDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents DiachikhachhangDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents CboNhom As MTGCComboBox
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents TxtTen_Nhom As System.Windows.Forms.TextBox
    Friend WithEvents TxtCK As System.Windows.Forms.TextBox
    Friend WithEvents TxtVC As System.Windows.Forms.TextBox
    Friend WithEvents TxtHanNo As System.Windows.Forms.TextBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents TxtMucNo As System.Windows.Forms.TextBox
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents TxtMST As System.Windows.Forms.TextBox
    Friend WithEvents TxtEmail As System.Windows.Forms.TextBox
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents CboNganHang As MTGCComboBox
    Friend WithEvents TxtTaiKhoan As System.Windows.Forms.TextBox
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents CboQuocGia As MTGCComboBox
    Friend WithEvents TxtTen_QuocGia As System.Windows.Forms.TextBox
    Friend WithEvents Label17 As System.Windows.Forms.Label
    Friend WithEvents CboKhuVuc As MTGCComboBox
    Friend WithEvents TxtTen_KhuVuc As System.Windows.Forms.TextBox
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents CboQuan As MTGCComboBox
    Friend WithEvents TxtTen_Quan As System.Windows.Forms.TextBox
    Friend WithEvents Label19 As System.Windows.Forms.Label
    Friend WithEvents CboTinh As MTGCComboBox
    Friend WithEvents TblnhacungcapBindingSource As System.Windows.Forms.BindingSource
    Friend WithEvents DataSetForm_Don As ANLONG.DataSetForm_Don
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents Label21 As System.Windows.Forms.Label
    Friend WithEvents Label22 As System.Windows.Forms.Label
    Friend WithEvents Label23 As System.Windows.Forms.Label
    Friend WithEvents Label24 As System.Windows.Forms.Label
    Friend WithEvents TabMain As System.Windows.Forms.TabControl
    Friend WithEvents TabThongtin As System.Windows.Forms.TabPage
    Friend WithEvents TabTimkiem As System.Windows.Forms.TabPage
    Friend WithEvents gridSearch As System.Windows.Forms.DataGridView
    Friend WithEvents Label25 As System.Windows.Forms.Label
    Friend WithEvents txtMaSearch As System.Windows.Forms.TextBox
    Friend WithEvents btnTimKiem As System.Windows.Forms.Button
    Friend WithEvents txtTenSearch As System.Windows.Forms.TextBox
    Friend WithEvents Label26 As System.Windows.Forms.Label
    Friend WithEvents colmaS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents coltenS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents coldiachiS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmstS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents coldienthoaiS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colfaxS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colemailS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colsotaikhoanS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmaquocgiaS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmamienS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmatinhS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmaquanS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmanganhangS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmucnoS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colchietkhauS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colvanchuyenS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colhannoS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmanhomS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colMa As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colten As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents coldiachi As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmst As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents coldt As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colfax As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colemail As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colsotaikhoan As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmaquocgia As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmamien As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmatinh As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmaquan As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmanganhang As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmucno As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colchietkhau As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colvanchuyen As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colhanno As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colmanhom As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents TxtTen_Tinh As System.Windows.Forms.TextBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmNhaCungCap))
        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Me.btnSave = New System.Windows.Forms.Button
        Me.btnNew = New System.Windows.Forms.Button
        Me.btnDelete1 = New System.Windows.Forms.Button
        Me.BtnClose = New System.Windows.Forms.Button
        Me.BtnIn = New System.Windows.Forms.Button
        Me.TxtFax = New System.Windows.Forms.TextBox
        Me.TxtDienThoai = New System.Windows.Forms.TextBox
        Me.txtTen_NganHang = New System.Windows.Forms.TextBox
        Me.txtDiaChi = New System.Windows.Forms.TextBox
        Me.txtTen_KH = New System.Windows.Forms.TextBox
        Me.txtMa_KH = New System.Windows.Forms.TextBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.DataGridView1 = New System.Windows.Forms.DataGridView
        Me.colMa = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colten = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.coldiachi = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmst = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.coldt = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colfax = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colemail = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colsotaikhoan = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmaquocgia = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmamien = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmatinh = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmaquan = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmanganhang = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmucno = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colchietkhau = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colvanchuyen = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colhanno = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmanhom = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.TblnhacungcapBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.DataSetForm_Don = New ANLONG.DataSetForm_Don
        Me.CboNhom = New MTGCComboBox
        Me.Label7 = New System.Windows.Forms.Label
        Me.TxtTen_Nhom = New System.Windows.Forms.TextBox
        Me.TxtCK = New System.Windows.Forms.TextBox
        Me.TxtVC = New System.Windows.Forms.TextBox
        Me.TxtHanNo = New System.Windows.Forms.TextBox
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label10 = New System.Windows.Forms.Label
        Me.Label11 = New System.Windows.Forms.Label
        Me.TxtMucNo = New System.Windows.Forms.TextBox
        Me.Label13 = New System.Windows.Forms.Label
        Me.TxtMST = New System.Windows.Forms.TextBox
        Me.TxtEmail = New System.Windows.Forms.TextBox
        Me.Label14 = New System.Windows.Forms.Label
        Me.Label15 = New System.Windows.Forms.Label
        Me.CboNganHang = New MTGCComboBox
        Me.TxtTaiKhoan = New System.Windows.Forms.TextBox
        Me.Label16 = New System.Windows.Forms.Label
        Me.Label12 = New System.Windows.Forms.Label
        Me.CboQuocGia = New MTGCComboBox
        Me.TxtTen_QuocGia = New System.Windows.Forms.TextBox
        Me.Label17 = New System.Windows.Forms.Label
        Me.CboKhuVuc = New MTGCComboBox
        Me.TxtTen_KhuVuc = New System.Windows.Forms.TextBox
        Me.Label18 = New System.Windows.Forms.Label
        Me.CboQuan = New MTGCComboBox
        Me.TxtTen_Quan = New System.Windows.Forms.TextBox
        Me.Label19 = New System.Windows.Forms.Label
        Me.CboTinh = New MTGCComboBox
        Me.TxtTen_Tinh = New System.Windows.Forms.TextBox
        Me.Label20 = New System.Windows.Forms.Label
        Me.Label21 = New System.Windows.Forms.Label
        Me.Label22 = New System.Windows.Forms.Label
        Me.Label23 = New System.Windows.Forms.Label
        Me.Label24 = New System.Windows.Forms.Label
        Me.TabMain = New System.Windows.Forms.TabControl
        Me.TabThongtin = New System.Windows.Forms.TabPage
        Me.TabTimkiem = New System.Windows.Forms.TabPage
        Me.gridSearch = New System.Windows.Forms.DataGridView
        Me.colmaS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.coltenS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.coldiachiS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmstS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.coldienthoaiS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colfaxS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colemailS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colsotaikhoanS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmaquocgiaS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmamienS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmatinhS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmaquanS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmanganhangS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmucnoS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colchietkhauS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colvanchuyenS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colhannoS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colmanhomS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.Label25 = New System.Windows.Forms.Label
        Me.txtMaSearch = New System.Windows.Forms.TextBox
        Me.btnTimKiem = New System.Windows.Forms.Button
        Me.txtTenSearch = New System.Windows.Forms.TextBox
        Me.Label26 = New System.Windows.Forms.Label
        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.TblnhacungcapBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DataSetForm_Don, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.TabMain.SuspendLayout()
        Me.TabThongtin.SuspendLayout()
        Me.TabTimkiem.SuspendLayout()
        CType(Me.gridSearch, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'btnSave
        '
        Me.btnSave.BackColor = System.Drawing.Color.Transparent
        Me.btnSave.Image = CType(resources.GetObject("btnSave.Image"), System.Drawing.Image)
        Me.btnSave.Location = New System.Drawing.Point(224, 203)
        Me.btnSave.Name = "btnSave"
        Me.btnSave.Size = New System.Drawing.Size(96, 24)
        Me.btnSave.TabIndex = 19
        Me.btnSave.UseVisualStyleBackColor = False
        '
        'btnNew
        '
        Me.btnNew.Image = CType(resources.GetObject("btnNew.Image"), System.Drawing.Image)
        Me.btnNew.Location = New System.Drawing.Point(114, 203)
        Me.btnNew.Name = "btnNew"
        Me.btnNew.Size = New System.Drawing.Size(96, 24)
        Me.btnNew.TabIndex = 20
        '
        'btnDelete1
        '
        Me.btnDelete1.Image = CType(resources.GetObject("btnDelete1.Image"), System.Drawing.Image)
        Me.btnDelete1.Location = New System.Drawing.Point(334, 203)
        Me.btnDelete1.Name = "btnDelete1"
        Me.btnDelete1.Size = New System.Drawing.Size(88, 24)
        Me.btnDelete1.TabIndex = 29
        '
        'BtnClose
        '
        Me.BtnClose.Image = CType(resources.GetObject("BtnClose.Image"), System.Drawing.Image)
        Me.BtnClose.Location = New System.Drawing.Point(540, 203)
        Me.BtnClose.Name = "BtnClose"
        Me.BtnClose.Size = New System.Drawing.Size(88, 24)
        Me.BtnClose.TabIndex = 30
        '
        'BtnIn
        '
        Me.BtnIn.Image = CType(resources.GetObject("BtnIn.Image"), System.Drawing.Image)
        Me.BtnIn.Location = New System.Drawing.Point(436, 203)
        Me.BtnIn.Name = "BtnIn"
        Me.BtnIn.Size = New System.Drawing.Size(88, 24)
        Me.BtnIn.TabIndex = 39
        '
        'TxtFax
        '
        Me.TxtFax.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.TxtFax.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtFax.Location = New System.Drawing.Point(284, 102)
        Me.TxtFax.MaxLength = 50
        Me.TxtFax.Name = "TxtFax"
        Me.TxtFax.Size = New System.Drawing.Size(148, 22)
        Me.TxtFax.TabIndex = 11
        Me.TxtFax.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TxtDienThoai
        '
        Me.TxtDienThoai.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtDienThoai.Location = New System.Drawing.Point(127, 102)
        Me.TxtDienThoai.MaxLength = 50
        Me.TxtDienThoai.Name = "TxtDienThoai"
        Me.TxtDienThoai.Size = New System.Drawing.Size(122, 22)
        Me.TxtDienThoai.TabIndex = 10
        Me.TxtDienThoai.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'txtTen_NganHang
        '
        Me.txtTen_NganHang.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtTen_NganHang.Location = New System.Drawing.Point(204, 125)
        Me.txtTen_NganHang.MaxLength = 50
        Me.txtTen_NganHang.Name = "txtTen_NganHang"
        Me.txtTen_NganHang.Size = New System.Drawing.Size(228, 22)
        Me.txtTen_NganHang.TabIndex = 14
        '
        'txtDiaChi
        '
        Me.txtDiaChi.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtDiaChi.Location = New System.Drawing.Point(127, 79)
        Me.txtDiaChi.MaxLength = 100
        Me.txtDiaChi.Name = "txtDiaChi"
        Me.txtDiaChi.Size = New System.Drawing.Size(570, 22)
        Me.txtDiaChi.TabIndex = 9
        '
        'txtTen_KH
        '
        Me.txtTen_KH.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtTen_KH.Location = New System.Drawing.Point(127, 56)
        Me.txtTen_KH.MaxLength = 50
        Me.txtTen_KH.Name = "txtTen_KH"
        Me.txtTen_KH.Size = New System.Drawing.Size(376, 22)
        Me.txtTen_KH.TabIndex = 7
        '
        'txtMa_KH
        '
        Me.txtMa_KH.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtMa_KH.Location = New System.Drawing.Point(127, 33)
        Me.txtMa_KH.MaxLength = 10
        Me.txtMa_KH.Name = "txtMa_KH"
        Me.txtMa_KH.Size = New System.Drawing.Size(122, 22)
        Me.txtMa_KH.TabIndex = 2
        '
        'Label6
        '
        Me.Label6.Location = New System.Drawing.Point(251, 102)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(27, 22)
        Me.Label6.TabIndex = 68
        Me.Label6.Text = "Fax"
        Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(69, 102)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(56, 22)
        Me.Label5.TabIndex = 67
        Me.Label5.Text = "Điện thoại"
        Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(44, 79)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(81, 22)
        Me.Label4.TabIndex = 64
        Me.Label4.Text = "Địa chỉ NCC"
        Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(22, 58)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(103, 18)
        Me.Label3.TabIndex = 63
        Me.Label3.Text = "Tên NCC"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(28, 33)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(97, 21)
        Me.Label2.TabIndex = 62
        Me.Label2.Text = "Mã NCC"
        Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.Color.Transparent
        Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.Location = New System.Drawing.Point(241, 2)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(346, 24)
        Me.Label1.TabIndex = 60
        Me.Label1.Text = "DANH MỤC NHÀ CUNG CẤP"
        '
        'DataGridView1
        '
        Me.DataGridView1.AllowUserToAddRows = False
        Me.DataGridView1.AllowUserToDeleteRows = False
        Me.DataGridView1.AllowUserToResizeColumns = False
        Me.DataGridView1.AutoGenerateColumns = False
        Me.DataGridView1.BackgroundColor = System.Drawing.Color.LightBlue
        DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
        DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control
        DataGridViewCellStyle1.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText
        DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
        DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
        DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
        Me.DataGridView1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.colMa, Me.colten, Me.coldiachi, Me.colmst, Me.coldt, Me.colfax, Me.colemail, Me.colsotaikhoan, Me.colmaquocgia, Me.colmamien, Me.colmatinh, Me.colmaquan, Me.colmanganhang, Me.colmucno, Me.colchietkhau, Me.colvanchuyen, Me.colhanno, Me.colmanhom})
        Me.DataGridView1.DataSource = Me.TblnhacungcapBindingSource
        Me.DataGridView1.Location = New System.Drawing.Point(9, 246)
        Me.DataGridView1.Name = "DataGridView1"
        Me.DataGridView1.ReadOnly = True
        Me.DataGridView1.RowHeadersWidth = 25
        Me.DataGridView1.Size = New System.Drawing.Size(764, 294)
        Me.DataGridView1.TabIndex = 75
        '
        'colMa
        '
        Me.colMa.DataPropertyName = "ma_nhacungcap"
        Me.colMa.HeaderText = "Mã NCC"
        Me.colMa.Name = "colMa"
        Me.colMa.ReadOnly = True
        '
        'colten
        '
        Me.colten.DataPropertyName = "ten_nhacungcap"
        Me.colten.HeaderText = "Tên NCC"
        Me.colten.Name = "colten"
        Me.colten.ReadOnly = True
        Me.colten.Width = 220
        '
        'coldiachi
        '
        Me.coldiachi.DataPropertyName = "diachi_nhacungcap"
        Me.coldiachi.HeaderText = "Địa chỉ"
        Me.coldiachi.Name = "coldiachi"
        Me.coldiachi.ReadOnly = True
        Me.coldiachi.Width = 200
        '
        'colmst
        '
        Me.colmst.DataPropertyName = "maso_thue"
        Me.colmst.HeaderText = "MST"
        Me.colmst.Name = "colmst"
        Me.colmst.ReadOnly = True
        '
        'coldt
        '
        Me.coldt.DataPropertyName = "dienthoai"
        Me.coldt.HeaderText = "ĐT"
        Me.coldt.Name = "coldt"
        Me.coldt.ReadOnly = True
        '
        'colfax
        '
        Me.colfax.DataPropertyName = "fax"
        Me.colfax.HeaderText = "fax"
        Me.colfax.Name = "colfax"
        Me.colfax.ReadOnly = True
        Me.colfax.Visible = False
        '
        'colemail
        '
        Me.colemail.DataPropertyName = "email"
        Me.colemail.HeaderText = "email"
        Me.colemail.Name = "colemail"
        Me.colemail.ReadOnly = True
        Me.colemail.Visible = False
        '
        'colsotaikhoan
        '
        Me.colsotaikhoan.DataPropertyName = "so_taikhoan"
        Me.colsotaikhoan.HeaderText = "so_taikhoan"
        Me.colsotaikhoan.Name = "colsotaikhoan"
        Me.colsotaikhoan.ReadOnly = True
        Me.colsotaikhoan.Visible = False
        '
        'colmaquocgia
        '
        Me.colmaquocgia.DataPropertyName = "ma_quocgia"
        Me.colmaquocgia.HeaderText = "ma_quocgia"
        Me.colmaquocgia.Name = "colmaquocgia"
        Me.colmaquocgia.ReadOnly = True
        Me.colmaquocgia.Visible = False
        '
        'colmamien
        '
        Me.colmamien.DataPropertyName = "ma_mien"
        Me.colmamien.HeaderText = "ma_mien"
        Me.colmamien.Name = "colmamien"
        Me.colmamien.ReadOnly = True
        Me.colmamien.Visible = False
        '
        'colmatinh
        '
        Me.colmatinh.DataPropertyName = "ma_tinh"
        Me.colmatinh.HeaderText = "ma_tinh"
        Me.colmatinh.Name = "colmatinh"
        Me.colmatinh.ReadOnly = True
        Me.colmatinh.Visible = False
        '
        'colmaquan
        '
        Me.colmaquan.DataPropertyName = "ma_quan"
        Me.colmaquan.HeaderText = "ma_quan"
        Me.colmaquan.Name = "colmaquan"
        Me.colmaquan.ReadOnly = True
        Me.colmaquan.Visible = False
        '
        'colmanganhang
        '
        Me.colmanganhang.DataPropertyName = "ma_nganhang"
        Me.colmanganhang.HeaderText = "ma_nganhang"
        Me.colmanganhang.Name = "colmanganhang"
        Me.colmanganhang.ReadOnly = True
        Me.colmanganhang.Visible = False
        '
        'colmucno
        '
        Me.colmucno.DataPropertyName = "mucno"
        Me.colmucno.HeaderText = "mucno"
        Me.colmucno.Name = "colmucno"
        Me.colmucno.ReadOnly = True
        Me.colmucno.Visible = False
        '
        'colchietkhau
        '
        Me.colchietkhau.DataPropertyName = "chietkhau"
        Me.colchietkhau.HeaderText = "chietkhau"
        Me.colchietkhau.Name = "colchietkhau"
        Me.colchietkhau.ReadOnly = True
        Me.colchietkhau.Visible = False
        '
        'colvanchuyen
        '
        Me.colvanchuyen.DataPropertyName = "vanchuyen"
        Me.colvanchuyen.HeaderText = "vanchuyen"
        Me.colvanchuyen.Name = "colvanchuyen"
        Me.colvanchuyen.ReadOnly = True
        Me.colvanchuyen.Visible = False
        '
        'colhanno
        '
        Me.colhanno.DataPropertyName = "hanno"
        Me.colhanno.HeaderText = "hanno"
        Me.colhanno.Name = "colhanno"
        Me.colhanno.ReadOnly = True
        Me.colhanno.Visible = False
        '
        'colmanhom
        '
        Me.colmanhom.DataPropertyName = "ma_nhom"
        Me.colmanhom.HeaderText = "ma_nhom"
        Me.colmanhom.Name = "colmanhom"
        Me.colmanhom.ReadOnly = True
        Me.colmanhom.Visible = False
        '
        'TblnhacungcapBindingSource
        '
        Me.TblnhacungcapBindingSource.DataMember = "tbl_nhacungcap"
        Me.TblnhacungcapBindingSource.DataSource = Me.DataSetForm_Don
        '
        'DataSetForm_Don
        '
        Me.DataSetForm_Don.DataSetName = "DataSetForm_Don"
        Me.DataSetForm_Don.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
        '
        'CboNhom
        '
        Me.CboNhom.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboNhom.ArrowColor = System.Drawing.Color.Black
        Me.CboNhom.BindedControl = Nothing
        Me.CboNhom.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboNhom.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboNhom.ColumnNum = 1
        Me.CboNhom.ColumnWidth = "121"
        Me.CboNhom.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboNhom.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboNhom.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboNhom.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboNhom.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboNhom.DisplayMember = "Text"
        Me.CboNhom.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboNhom.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboNhom.DropDownForeColor = System.Drawing.Color.Black
        Me.CboNhom.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboNhom.DropDownWidth = 141
        Me.CboNhom.GridLineColor = System.Drawing.Color.LightGray
        Me.CboNhom.GridLineHorizontal = False
        Me.CboNhom.GridLineVertical = False
        Me.CboNhom.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboNhom.Location = New System.Drawing.Point(127, 10)
        Me.CboNhom.ManagingFastMouseMoving = True
        Me.CboNhom.ManagingFastMouseMovingInterval = 30
        Me.CboNhom.Name = "CboNhom"
        Me.CboNhom.SelectedItem = Nothing
        Me.CboNhom.SelectedValue = Nothing
        Me.CboNhom.Size = New System.Drawing.Size(122, 21)
        Me.CboNhom.TabIndex = 0
        '
        'Label7
        '
        Me.Label7.Location = New System.Drawing.Point(47, 10)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(78, 21)
        Me.Label7.TabIndex = 77
        Me.Label7.Text = "Mã Nhóm NCC"
        Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'TxtTen_Nhom
        '
        Me.TxtTen_Nhom.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_Nhom.Location = New System.Drawing.Point(251, 10)
        Me.TxtTen_Nhom.MaxLength = 50
        Me.TxtTen_Nhom.Name = "TxtTen_Nhom"
        Me.TxtTen_Nhom.Size = New System.Drawing.Size(446, 22)
        Me.TxtTen_Nhom.TabIndex = 1
        '
        'TxtCK
        '
        Me.TxtCK.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtCK.Location = New System.Drawing.Point(296, 33)
        Me.TxtCK.MaxLength = 10
        Me.TxtCK.Name = "TxtCK"
        Me.TxtCK.Size = New System.Drawing.Size(29, 22)
        Me.TxtCK.TabIndex = 3
        Me.TxtCK.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TxtVC
        '
        Me.TxtVC.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtVC.Location = New System.Drawing.Point(372, 33)
        Me.TxtVC.MaxLength = 10
        Me.TxtVC.Name = "TxtVC"
        Me.TxtVC.Size = New System.Drawing.Size(32, 22)
        Me.TxtVC.TabIndex = 4
        Me.TxtVC.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'TxtHanNo
        '
        Me.TxtHanNo.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtHanNo.Location = New System.Drawing.Point(467, 33)
        Me.TxtHanNo.MaxLength = 10
        Me.TxtHanNo.Name = "TxtHanNo"
        Me.TxtHanNo.Size = New System.Drawing.Size(36, 22)
        Me.TxtHanNo.TabIndex = 5
        Me.TxtHanNo.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'Label8
        '
        Me.Label8.Location = New System.Drawing.Point(254, 33)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(40, 21)
        Me.Label8.TabIndex = 82
        Me.Label8.Text = "CK(%)"
        Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label9
        '
        Me.Label9.Location = New System.Drawing.Point(331, 33)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(40, 21)
        Me.Label9.TabIndex = 83
        Me.Label9.Text = "VC(%)"
        Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label10
        '
        Me.Label10.Location = New System.Drawing.Point(411, 33)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(48, 21)
        Me.Label10.TabIndex = 84
        Me.Label10.Text = "Hạn Nợ"
        Me.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label11
        '
        Me.Label11.Location = New System.Drawing.Point(509, 33)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(48, 21)
        Me.Label11.TabIndex = 86
        Me.Label11.Text = "Mức Nợ"
        Me.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'TxtMucNo
        '
        Me.TxtMucNo.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtMucNo.Location = New System.Drawing.Point(562, 33)
        Me.TxtMucNo.MaxLength = 10
        Me.TxtMucNo.Name = "TxtMucNo"
        Me.TxtMucNo.Size = New System.Drawing.Size(135, 22)
        Me.TxtMucNo.TabIndex = 6
        Me.TxtMucNo.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'Label13
        '
        Me.Label13.Location = New System.Drawing.Point(513, 58)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(43, 18)
        Me.Label13.TabIndex = 88
        Me.Label13.Text = "MST"
        Me.Label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'TxtMST
        '
        Me.TxtMST.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtMST.Location = New System.Drawing.Point(562, 56)
        Me.TxtMST.MaxLength = 50
        Me.TxtMST.Name = "TxtMST"
        Me.TxtMST.Size = New System.Drawing.Size(135, 22)
        Me.TxtMST.TabIndex = 8
        '
        'TxtEmail
        '
        Me.TxtEmail.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.TxtEmail.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtEmail.Location = New System.Drawing.Point(488, 102)
        Me.TxtEmail.MaxLength = 50
        Me.TxtEmail.Name = "TxtEmail"
        Me.TxtEmail.Size = New System.Drawing.Size(209, 22)
        Me.TxtEmail.TabIndex = 12
        Me.TxtEmail.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'Label14
        '
        Me.Label14.Location = New System.Drawing.Point(438, 102)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(44, 22)
        Me.Label14.TabIndex = 90
        Me.Label14.Text = "Email"
        Me.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label15
        '
        Me.Label15.Location = New System.Drawing.Point(52, 127)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(73, 19)
        Me.Label15.TabIndex = 92
        Me.Label15.Text = "Ngân hàng"
        Me.Label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'CboNganHang
        '
        Me.CboNganHang.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboNganHang.ArrowColor = System.Drawing.Color.Black
        Me.CboNganHang.BindedControl = Nothing
        Me.CboNganHang.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboNganHang.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboNganHang.ColumnNum = 1
        Me.CboNganHang.ColumnWidth = "121"
        Me.CboNganHang.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboNganHang.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboNganHang.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboNganHang.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboNganHang.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboNganHang.DisplayMember = "Text"
        Me.CboNganHang.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboNganHang.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboNganHang.DropDownForeColor = System.Drawing.Color.Black
        Me.CboNganHang.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboNganHang.DropDownWidth = 141
        Me.CboNganHang.GridLineColor = System.Drawing.Color.LightGray
        Me.CboNganHang.GridLineHorizontal = False
        Me.CboNganHang.GridLineVertical = False
        Me.CboNganHang.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboNganHang.Location = New System.Drawing.Point(128, 125)
        Me.CboNganHang.ManagingFastMouseMoving = True
        Me.CboNganHang.ManagingFastMouseMovingInterval = 30
        Me.CboNganHang.Name = "CboNganHang"
        Me.CboNganHang.SelectedItem = Nothing
        Me.CboNganHang.SelectedValue = Nothing
        Me.CboNganHang.Size = New System.Drawing.Size(75, 21)
        Me.CboNganHang.TabIndex = 13
        '
        'TxtTaiKhoan
        '
        Me.TxtTaiKhoan.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.TxtTaiKhoan.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTaiKhoan.Location = New System.Drawing.Point(488, 125)
        Me.TxtTaiKhoan.MaxLength = 50
        Me.TxtTaiKhoan.Name = "TxtTaiKhoan"
        Me.TxtTaiKhoan.Size = New System.Drawing.Size(209, 22)
        Me.TxtTaiKhoan.TabIndex = 14
        Me.TxtTaiKhoan.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        '
        'Label16
        '
        Me.Label16.Location = New System.Drawing.Point(438, 127)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(44, 22)
        Me.Label16.TabIndex = 94
        Me.Label16.Text = "TK số"
        Me.Label16.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label12
        '
        Me.Label12.Location = New System.Drawing.Point(40, 147)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(85, 19)
        Me.Label12.TabIndex = 97
        Me.Label12.Text = "Tên Quốc Gia"
        Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'CboQuocGia
        '
        Me.CboQuocGia.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboQuocGia.ArrowColor = System.Drawing.Color.Black
        Me.CboQuocGia.BindedControl = Nothing
        Me.CboQuocGia.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboQuocGia.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboQuocGia.ColumnNum = 1
        Me.CboQuocGia.ColumnWidth = "121"
        Me.CboQuocGia.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboQuocGia.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboQuocGia.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboQuocGia.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboQuocGia.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboQuocGia.DisplayMember = "Text"
        Me.CboQuocGia.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboQuocGia.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboQuocGia.DropDownForeColor = System.Drawing.Color.Black
        Me.CboQuocGia.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboQuocGia.DropDownWidth = 141
        Me.CboQuocGia.GridLineColor = System.Drawing.Color.LightGray
        Me.CboQuocGia.GridLineHorizontal = False
        Me.CboQuocGia.GridLineVertical = False
        Me.CboQuocGia.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboQuocGia.Location = New System.Drawing.Point(128, 149)
        Me.CboQuocGia.ManagingFastMouseMoving = True
        Me.CboQuocGia.ManagingFastMouseMovingInterval = 30
        Me.CboQuocGia.Name = "CboQuocGia"
        Me.CboQuocGia.SelectedItem = Nothing
        Me.CboQuocGia.SelectedValue = Nothing
        Me.CboQuocGia.Size = New System.Drawing.Size(75, 21)
        Me.CboQuocGia.TabIndex = 15
        '
        'TxtTen_QuocGia
        '
        Me.TxtTen_QuocGia.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_QuocGia.Location = New System.Drawing.Point(204, 149)
        Me.TxtTen_QuocGia.MaxLength = 50
        Me.TxtTen_QuocGia.Name = "TxtTen_QuocGia"
        Me.TxtTen_QuocGia.Size = New System.Drawing.Size(167, 22)
        Me.TxtTen_QuocGia.TabIndex = 17
        '
        'Label17
        '
        Me.Label17.Location = New System.Drawing.Point(375, 147)
        Me.Label17.Name = "Label17"
        Me.Label17.Size = New System.Drawing.Size(61, 19)
        Me.Label17.TabIndex = 100
        Me.Label17.Text = "Khu vực"
        Me.Label17.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'CboKhuVuc
        '
        Me.CboKhuVuc.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboKhuVuc.ArrowColor = System.Drawing.Color.Black
        Me.CboKhuVuc.BindedControl = Nothing
        Me.CboKhuVuc.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboKhuVuc.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboKhuVuc.ColumnNum = 1
        Me.CboKhuVuc.ColumnWidth = "121"
        Me.CboKhuVuc.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboKhuVuc.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboKhuVuc.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboKhuVuc.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboKhuVuc.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboKhuVuc.DisplayMember = "Text"
        Me.CboKhuVuc.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboKhuVuc.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboKhuVuc.DropDownForeColor = System.Drawing.Color.Black
        Me.CboKhuVuc.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboKhuVuc.DropDownWidth = 141
        Me.CboKhuVuc.GridLineColor = System.Drawing.Color.LightGray
        Me.CboKhuVuc.GridLineHorizontal = False
        Me.CboKhuVuc.GridLineVertical = False
        Me.CboKhuVuc.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboKhuVuc.Location = New System.Drawing.Point(447, 149)
        Me.CboKhuVuc.ManagingFastMouseMoving = True
        Me.CboKhuVuc.ManagingFastMouseMovingInterval = 30
        Me.CboKhuVuc.Name = "CboKhuVuc"
        Me.CboKhuVuc.SelectedItem = Nothing
        Me.CboKhuVuc.SelectedValue = Nothing
        Me.CboKhuVuc.Size = New System.Drawing.Size(75, 21)
        Me.CboKhuVuc.TabIndex = 16
        '
        'TxtTen_KhuVuc
        '
        Me.TxtTen_KhuVuc.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_KhuVuc.Location = New System.Drawing.Point(523, 149)
        Me.TxtTen_KhuVuc.MaxLength = 50
        Me.TxtTen_KhuVuc.Name = "TxtTen_KhuVuc"
        Me.TxtTen_KhuVuc.Size = New System.Drawing.Size(174, 22)
        Me.TxtTen_KhuVuc.TabIndex = 19
        '
        'Label18
        '
        Me.Label18.Location = New System.Drawing.Point(374, 174)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(71, 19)
        Me.Label18.TabIndex = 106
        Me.Label18.Text = "Quận/Huyện"
        Me.Label18.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'CboQuan
        '
        Me.CboQuan.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboQuan.ArrowColor = System.Drawing.Color.Black
        Me.CboQuan.BindedControl = Nothing
        Me.CboQuan.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboQuan.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboQuan.ColumnNum = 1
        Me.CboQuan.ColumnWidth = "121"
        Me.CboQuan.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboQuan.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboQuan.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboQuan.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboQuan.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboQuan.DisplayMember = "Text"
        Me.CboQuan.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboQuan.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboQuan.DropDownForeColor = System.Drawing.Color.Black
        Me.CboQuan.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboQuan.DropDownWidth = 141
        Me.CboQuan.GridLineColor = System.Drawing.Color.LightGray
        Me.CboQuan.GridLineHorizontal = False
        Me.CboQuan.GridLineVertical = False
        Me.CboQuan.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboQuan.Location = New System.Drawing.Point(447, 173)
        Me.CboQuan.ManagingFastMouseMoving = True
        Me.CboQuan.ManagingFastMouseMovingInterval = 30
        Me.CboQuan.Name = "CboQuan"
        Me.CboQuan.SelectedItem = Nothing
        Me.CboQuan.SelectedValue = Nothing
        Me.CboQuan.Size = New System.Drawing.Size(75, 21)
        Me.CboQuan.TabIndex = 18
        '
        'TxtTen_Quan
        '
        Me.TxtTen_Quan.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_Quan.Location = New System.Drawing.Point(523, 173)
        Me.TxtTen_Quan.MaxLength = 50
        Me.TxtTen_Quan.Name = "TxtTen_Quan"
        Me.TxtTen_Quan.Size = New System.Drawing.Size(174, 22)
        Me.TxtTen_Quan.TabIndex = 23
        '
        'Label19
        '
        Me.Label19.Location = New System.Drawing.Point(54, 174)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(71, 19)
        Me.Label19.TabIndex = 103
        Me.Label19.Text = "Tỉnh/Thành"
        Me.Label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'CboTinh
        '
        Me.CboTinh.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboTinh.ArrowColor = System.Drawing.Color.Black
        Me.CboTinh.BindedControl = Nothing
        Me.CboTinh.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboTinh.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboTinh.ColumnNum = 1
        Me.CboTinh.ColumnWidth = "121"
        Me.CboTinh.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboTinh.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboTinh.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboTinh.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboTinh.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboTinh.DisplayMember = "Text"
        Me.CboTinh.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboTinh.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboTinh.DropDownForeColor = System.Drawing.Color.Black
        Me.CboTinh.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboTinh.DropDownWidth = 141
        Me.CboTinh.GridLineColor = System.Drawing.Color.LightGray
        Me.CboTinh.GridLineHorizontal = False
        Me.CboTinh.GridLineVertical = False
        Me.CboTinh.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboTinh.Location = New System.Drawing.Point(128, 173)
        Me.CboTinh.ManagingFastMouseMoving = True
        Me.CboTinh.ManagingFastMouseMovingInterval = 30
        Me.CboTinh.Name = "CboTinh"
        Me.CboTinh.SelectedItem = Nothing
        Me.CboTinh.SelectedValue = Nothing
        Me.CboTinh.Size = New System.Drawing.Size(75, 21)
        Me.CboTinh.TabIndex = 17
        '
        'TxtTen_Tinh
        '
        Me.TxtTen_Tinh.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_Tinh.Location = New System.Drawing.Point(204, 173)
        Me.TxtTen_Tinh.MaxLength = 50
        Me.TxtTen_Tinh.Name = "TxtTen_Tinh"
        Me.TxtTen_Tinh.Size = New System.Drawing.Size(167, 22)
        Me.TxtTen_Tinh.TabIndex = 21
        '
        'Label20
        '
        Me.Label20.AutoSize = True
        Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label20.ForeColor = System.Drawing.Color.DarkGreen
        Me.Label20.Location = New System.Drawing.Point(145, 230)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(33, 13)
        Me.Label20.TabIndex = 1071
        Me.Label20.Text = "Ctrl-N"
        Me.Label20.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'Label21
        '
        Me.Label21.AutoSize = True
        Me.Label21.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label21.ForeColor = System.Drawing.Color.DarkGreen
        Me.Label21.Location = New System.Drawing.Point(255, 230)
        Me.Label21.Name = "Label21"
        Me.Label21.Size = New System.Drawing.Size(32, 13)
        Me.Label21.TabIndex = 1072
        Me.Label21.Text = "Ctrl-S"
        Me.Label21.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'Label22
        '
        Me.Label22.AutoSize = True
        Me.Label22.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label22.ForeColor = System.Drawing.Color.DarkGreen
        Me.Label22.Location = New System.Drawing.Point(360, 230)
        Me.Label22.Name = "Label22"
        Me.Label22.Size = New System.Drawing.Size(33, 13)
        Me.Label22.TabIndex = 1073
        Me.Label22.Text = "Ctrl-D"
        Me.Label22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'Label23
        '
        Me.Label23.AutoSize = True
        Me.Label23.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label23.ForeColor = System.Drawing.Color.DarkGreen
        Me.Label23.Location = New System.Drawing.Point(464, 230)
        Me.Label23.Name = "Label23"
        Me.Label23.Size = New System.Drawing.Size(32, 13)
        Me.Label23.TabIndex = 1074
        Me.Label23.Text = "Ctrl-P"
        Me.Label23.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'Label24
        '
        Me.Label24.AutoSize = True
        Me.Label24.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label24.ForeColor = System.Drawing.Color.DarkGreen
        Me.Label24.Location = New System.Drawing.Point(570, 230)
        Me.Label24.Name = "Label24"
        Me.Label24.Size = New System.Drawing.Size(33, 13)
        Me.Label24.TabIndex = 1075
        Me.Label24.Text = "Ctrl-Q"
        Me.Label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'TabMain
        '
        Me.TabMain.Appearance = System.Windows.Forms.TabAppearance.FlatButtons
        Me.TabMain.Controls.Add(Me.TabThongtin)
        Me.TabMain.Controls.Add(Me.TabTimkiem)
        Me.TabMain.Location = New System.Drawing.Point(3, 29)
        Me.TabMain.Name = "TabMain"
        Me.TabMain.SelectedIndex = 0
        Me.TabMain.Size = New System.Drawing.Size(786, 582)
        Me.TabMain.TabIndex = 1076
        '
        'TabThongtin
        '
        Me.TabThongtin.BackColor = System.Drawing.Color.LightBlue
        Me.TabThongtin.Controls.Add(Me.Label10)
        Me.TabThongtin.Controls.Add(Me.DataGridView1)
        Me.TabThongtin.Controls.Add(Me.Label24)
        Me.TabThongtin.Controls.Add(Me.btnSave)
        Me.TabThongtin.Controls.Add(Me.Label23)
        Me.TabThongtin.Controls.Add(Me.btnNew)
        Me.TabThongtin.Controls.Add(Me.Label22)
        Me.TabThongtin.Controls.Add(Me.btnDelete1)
        Me.TabThongtin.Controls.Add(Me.Label21)
        Me.TabThongtin.Controls.Add(Me.BtnClose)
        Me.TabThongtin.Controls.Add(Me.Label20)
        Me.TabThongtin.Controls.Add(Me.BtnIn)
        Me.TabThongtin.Controls.Add(Me.Label18)
        Me.TabThongtin.Controls.Add(Me.Label2)
        Me.TabThongtin.Controls.Add(Me.CboQuan)
        Me.TabThongtin.Controls.Add(Me.Label3)
        Me.TabThongtin.Controls.Add(Me.TxtTen_Quan)
        Me.TabThongtin.Controls.Add(Me.Label4)
        Me.TabThongtin.Controls.Add(Me.Label19)
        Me.TabThongtin.Controls.Add(Me.Label5)
        Me.TabThongtin.Controls.Add(Me.CboTinh)
        Me.TabThongtin.Controls.Add(Me.Label6)
        Me.TabThongtin.Controls.Add(Me.TxtTen_Tinh)
        Me.TabThongtin.Controls.Add(Me.txtMa_KH)
        Me.TabThongtin.Controls.Add(Me.Label17)
        Me.TabThongtin.Controls.Add(Me.txtTen_KH)
        Me.TabThongtin.Controls.Add(Me.CboKhuVuc)
        Me.TabThongtin.Controls.Add(Me.txtDiaChi)
        Me.TabThongtin.Controls.Add(Me.TxtTen_KhuVuc)
        Me.TabThongtin.Controls.Add(Me.txtTen_NganHang)
        Me.TabThongtin.Controls.Add(Me.Label12)
        Me.TabThongtin.Controls.Add(Me.TxtDienThoai)
        Me.TabThongtin.Controls.Add(Me.CboQuocGia)
        Me.TabThongtin.Controls.Add(Me.TxtFax)
        Me.TabThongtin.Controls.Add(Me.TxtTen_QuocGia)
        Me.TabThongtin.Controls.Add(Me.CboNhom)
        Me.TabThongtin.Controls.Add(Me.TxtTaiKhoan)
        Me.TabThongtin.Controls.Add(Me.Label7)
        Me.TabThongtin.Controls.Add(Me.Label16)
        Me.TabThongtin.Controls.Add(Me.TxtTen_Nhom)
        Me.TabThongtin.Controls.Add(Me.Label15)
        Me.TabThongtin.Controls.Add(Me.TxtCK)
        Me.TabThongtin.Controls.Add(Me.CboNganHang)
        Me.TabThongtin.Controls.Add(Me.TxtVC)
        Me.TabThongtin.Controls.Add(Me.TxtEmail)
        Me.TabThongtin.Controls.Add(Me.TxtHanNo)
        Me.TabThongtin.Controls.Add(Me.Label14)
        Me.TabThongtin.Controls.Add(Me.Label8)
        Me.TabThongtin.Controls.Add(Me.Label13)
        Me.TabThongtin.Controls.Add(Me.Label9)
        Me.TabThongtin.Controls.Add(Me.TxtMST)
        Me.TabThongtin.Controls.Add(Me.TxtMucNo)
        Me.TabThongtin.Controls.Add(Me.Label11)
        Me.TabThongtin.Location = New System.Drawing.Point(4, 26)
        Me.TabThongtin.Name = "TabThongtin"
        Me.TabThongtin.Padding = New System.Windows.Forms.Padding(3)
        Me.TabThongtin.Size = New System.Drawing.Size(778, 552)
        Me.TabThongtin.TabIndex = 0
        Me.TabThongtin.Text = "Thông tin"
        '
        'TabTimkiem
        '
        Me.TabTimkiem.BackColor = System.Drawing.Color.LightBlue
        Me.TabTimkiem.Controls.Add(Me.gridSearch)
        Me.TabTimkiem.Controls.Add(Me.Label25)
        Me.TabTimkiem.Controls.Add(Me.txtMaSearch)
        Me.TabTimkiem.Controls.Add(Me.btnTimKiem)
        Me.TabTimkiem.Controls.Add(Me.txtTenSearch)
        Me.TabTimkiem.Controls.Add(Me.Label26)
        Me.TabTimkiem.Location = New System.Drawing.Point(4, 26)
        Me.TabTimkiem.Name = "TabTimkiem"
        Me.TabTimkiem.Padding = New System.Windows.Forms.Padding(3)
        Me.TabTimkiem.Size = New System.Drawing.Size(778, 552)
        Me.TabTimkiem.TabIndex = 1
        Me.TabTimkiem.Text = "Tìm kiếm"
        '
        'gridSearch
        '
        Me.gridSearch.AllowUserToAddRows = False
        Me.gridSearch.AllowUserToDeleteRows = False
        Me.gridSearch.AllowUserToResizeColumns = False
        Me.gridSearch.AutoGenerateColumns = False
        Me.gridSearch.BackgroundColor = System.Drawing.Color.LightBlue
        DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
        DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control
        DataGridViewCellStyle2.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText
        DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight
        DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText
        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
        Me.gridSearch.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle2
        Me.gridSearch.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.gridSearch.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.colmaS, Me.coltenS, Me.coldiachiS, Me.colmstS, Me.coldienthoaiS, Me.colfaxS, Me.colemailS, Me.colsotaikhoanS, Me.colmaquocgiaS, Me.colmamienS, Me.colmatinhS, Me.colmaquanS, Me.colmanganhangS, Me.colmucnoS, Me.colchietkhauS, Me.colvanchuyenS, Me.colhannoS, Me.colmanhomS})
        Me.gridSearch.DataSource = Me.TblnhacungcapBindingSource
        Me.gridSearch.Location = New System.Drawing.Point(7, 89)
        Me.gridSearch.Name = "gridSearch"
        Me.gridSearch.ReadOnly = True
        Me.gridSearch.RowHeadersWidth = 25
        Me.gridSearch.Size = New System.Drawing.Size(764, 451)
        Me.gridSearch.TabIndex = 87
        '
        'colmaS
        '
        Me.colmaS.DataPropertyName = "ma_nhacungcap"
        Me.colmaS.HeaderText = "Mã NCC"
        Me.colmaS.Name = "colmaS"
        Me.colmaS.ReadOnly = True
        '
        'coltenS
        '
        Me.coltenS.DataPropertyName = "ten_nhacungcap"
        Me.coltenS.HeaderText = "Tên NCC"
        Me.coltenS.Name = "coltenS"
        Me.coltenS.ReadOnly = True
        Me.coltenS.Width = 220
        '
        'coldiachiS
        '
        Me.coldiachiS.DataPropertyName = "diachi_nhacungcap"
        Me.coldiachiS.HeaderText = "Địa chỉ"
        Me.coldiachiS.Name = "coldiachiS"
        Me.coldiachiS.ReadOnly = True
        Me.coldiachiS.Width = 200
        '
        'colmstS
        '
        Me.colmstS.DataPropertyName = "maso_thue"
        Me.colmstS.HeaderText = "MST"
        Me.colmstS.Name = "colmstS"
        Me.colmstS.ReadOnly = True
        '
        'coldienthoaiS
        '
        Me.coldienthoaiS.DataPropertyName = "dienthoai"
        Me.coldienthoaiS.HeaderText = "ĐT"
        Me.coldienthoaiS.Name = "coldienthoaiS"
        Me.coldienthoaiS.ReadOnly = True
        '
        'colfaxS
        '
        Me.colfaxS.DataPropertyName = "fax"
        Me.colfaxS.HeaderText = "fax"
        Me.colfaxS.Name = "colfaxS"
        Me.colfaxS.ReadOnly = True
        Me.colfaxS.Visible = False
        '
        'colemailS
        '
        Me.colemailS.DataPropertyName = "email"
        Me.colemailS.HeaderText = "email"
        Me.colemailS.Name = "colemailS"
        Me.colemailS.ReadOnly = True
        Me.colemailS.Visible = False
        '
        'colsotaikhoanS
        '
        Me.colsotaikhoanS.DataPropertyName = "so_taikhoan"
        Me.colsotaikhoanS.HeaderText = "so_taikhoan"
        Me.colsotaikhoanS.Name = "colsotaikhoanS"
        Me.colsotaikhoanS.ReadOnly = True
        Me.colsotaikhoanS.Visible = False
        '
        'colmaquocgiaS
        '
        Me.colmaquocgiaS.DataPropertyName = "ma_quocgia"
        Me.colmaquocgiaS.HeaderText = "ma_quocgia"
        Me.colmaquocgiaS.Name = "colmaquocgiaS"
        Me.colmaquocgiaS.ReadOnly = True
        Me.colmaquocgiaS.Visible = False
        '
        'colmamienS
        '
        Me.colmamienS.DataPropertyName = "ma_mien"
        Me.colmamienS.HeaderText = "ma_mien"
        Me.colmamienS.Name = "colmamienS"
        Me.colmamienS.ReadOnly = True
        Me.colmamienS.Visible = False
        '
        'colmatinhS
        '
        Me.colmatinhS.DataPropertyName = "ma_tinh"
        Me.colmatinhS.HeaderText = "ma_tinh"
        Me.colmatinhS.Name = "colmatinhS"
        Me.colmatinhS.ReadOnly = True
        Me.colmatinhS.Visible = False
        '
        'colmaquanS
        '
        Me.colmaquanS.DataPropertyName = "ma_quan"
        Me.colmaquanS.HeaderText = "ma_quan"
        Me.colmaquanS.Name = "colmaquanS"
        Me.colmaquanS.ReadOnly = True
        Me.colmaquanS.Visible = False
        '
        'colmanganhangS
        '
        Me.colmanganhangS.DataPropertyName = "ma_nganhang"
        Me.colmanganhangS.HeaderText = "ma_nganhang"
        Me.colmanganhangS.Name = "colmanganhangS"
        Me.colmanganhangS.ReadOnly = True
        Me.colmanganhangS.Visible = False
        '
        'colmucnoS
        '
        Me.colmucnoS.DataPropertyName = "mucno"
        Me.colmucnoS.HeaderText = "mucno"
        Me.colmucnoS.Name = "colmucnoS"
        Me.colmucnoS.ReadOnly = True
        Me.colmucnoS.Visible = False
        '
        'colchietkhauS
        '
        Me.colchietkhauS.DataPropertyName = "chietkhau"
        Me.colchietkhauS.HeaderText = "chietkhau"
        Me.colchietkhauS.Name = "colchietkhauS"
        Me.colchietkhauS.ReadOnly = True
        Me.colchietkhauS.Visible = False
        '
        'colvanchuyenS
        '
        Me.colvanchuyenS.DataPropertyName = "vanchuyen"
        Me.colvanchuyenS.HeaderText = "vanchuyen"
        Me.colvanchuyenS.Name = "colvanchuyenS"
        Me.colvanchuyenS.ReadOnly = True
        Me.colvanchuyenS.Visible = False
        '
        'colhannoS
        '
        Me.colhannoS.DataPropertyName = "hanno"
        Me.colhannoS.HeaderText = "hanno"
        Me.colhannoS.Name = "colhannoS"
        Me.colhannoS.ReadOnly = True
        Me.colhannoS.Visible = False
        '
        'colmanhomS
        '
        Me.colmanhomS.DataPropertyName = "ma_nhom"
        Me.colmanhomS.HeaderText = "ma_nhom"
        Me.colmanhomS.Name = "colmanhomS"
        Me.colmanhomS.ReadOnly = True
        Me.colmanhomS.Visible = False
        '
        'Label25
        '
        Me.Label25.AutoSize = True
        Me.Label25.Location = New System.Drawing.Point(233, 9)
        Me.Label25.Name = "Label25"
        Me.Label25.Size = New System.Drawing.Size(67, 14)
        Me.Label25.TabIndex = 86
        Me.Label25.Text = "Tìm theo Mã "
        Me.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'txtMaSearch
        '
        Me.txtMaSearch.Location = New System.Drawing.Point(301, 6)
        Me.txtMaSearch.Name = "txtMaSearch"
        Me.txtMaSearch.Size = New System.Drawing.Size(203, 20)
        Me.txtMaSearch.TabIndex = 85
        '
        'btnTimKiem
        '
        Me.btnTimKiem.Location = New System.Drawing.Point(331, 58)
        Me.btnTimKiem.Name = "btnTimKiem"
        Me.btnTimKiem.Size = New System.Drawing.Size(91, 23)
        Me.btnTimKiem.TabIndex = 84
        Me.btnTimKiem.Text = "Tìm kiếm..."
        Me.btnTimKiem.UseVisualStyleBackColor = True
        '
        'txtTenSearch
        '
        Me.txtTenSearch.Location = New System.Drawing.Point(302, 32)
        Me.txtTenSearch.Name = "txtTenSearch"
        Me.txtTenSearch.Size = New System.Drawing.Size(202, 20)
        Me.txtTenSearch.TabIndex = 83
        '
        'Label26
        '
        Me.Label26.AutoSize = True
        Me.Label26.Location = New System.Drawing.Point(229, 35)
        Me.Label26.Name = "Label26"
        Me.Label26.Size = New System.Drawing.Size(68, 14)
        Me.Label26.TabIndex = 82
        Me.Label26.Text = "Tìm theo Tên"
        Me.Label26.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'frmNhaCungCap
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackColor = System.Drawing.Color.LightBlue
        Me.ClientSize = New System.Drawing.Size(792, 613)
        Me.Controls.Add(Me.TabMain)
        Me.Controls.Add(Me.Label1)
        Me.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Name = "frmNhaCungCap"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = " Danh Muc Nha Cung Cap"
        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.TblnhacungcapBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataSetForm_Don, System.ComponentModel.ISupportInitialize).EndInit()
        Me.TabMain.ResumeLayout(False)
        Me.TabThongtin.ResumeLayout(False)
        Me.TabThongtin.PerformLayout()
        Me.TabTimkiem.ResumeLayout(False)
        Me.TabTimkiem.PerformLayout()
        CType(Me.gridSearch, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region
    Private dataNganHang, dataNhomNCC, dataQuocGia, dataKhuVuc, dataTinh, dataQuan As DataTable
    Private da As MySqlDataAdapter
    Dim myDT As New DataTable
    Dim strError As String = ""
    Dim myform As Form
    Dim sqlQuery As String = ""
    Sub SetclearData()
        TxtTen_Nhom.Text = ""
        txtMa_KH.Text = ""
        TxtCK.Text = "0"
        TxtVC.Text = "0"
        TxtHanNo.Text = "0"
        TxtMucNo.Text = "0"
        txtTen_KH.Text = ""
        TxtMST.Text = ""
        txtDiaChi.Text = ""
        TxtDienThoai.Text = ""
        TxtFax.Text = ""
        TxtEmail.Text = ""
        TxtTaiKhoan.Text = ""
    End Sub
    Private Sub frmNhaCungCap_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        'tao moi
        If e.KeyCode = (e.Control And Keys.N) Then
            SetclearData()
            CboNhom.Focus()
        End If
        'Luu
        If e.KeyCode = (e.Control And Keys.S) Then
            luu()
        End If
        'Xoa
        If e.KeyCode = (e.Control And Keys.D) Then
            xoa()
        End If
        'Thoat
        If e.KeyCode = (e.Control And Keys.Q) Then
            Me.Close()
        End If
        If e.KeyCode = (e.Control And Keys.P) Then
            FrmCrNhaCungCap.Show()
        End If
    End Sub
    Private Sub frmNhaCungCap_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
        'tao moi
        If e.KeyCode = (e.Control And Keys.N) Then
            SetclearData()
            CboNhom.Focus()
        End If
        'Luu
        If e.KeyCode = (e.Control And Keys.S) Then
            luu()
        End If
        'Xoa
        If e.KeyCode = (e.Control And Keys.D) Then
            xoa()
        End If
        'Thoat
        If e.KeyCode = (e.Control And Keys.Q) Then
            Me.Close()
        End If
        If e.KeyCode = (e.Control And Keys.P) Then
            FrmCrNhaCungCap.Show()
        End If
    End Sub
    Private Sub CboNhom_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CboNhom.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtTen_Nhom.Focus()
        End If
    End Sub
    Private Sub TxtTen_Nhom_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtTen_Nhom.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.txtMa_KH.Focus()
        End If
    End Sub
    Private Sub txtMa_KH_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMa_KH.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtCK.Focus()
        End If
    End Sub
    Private Sub TxtCK_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtCK.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtVC.Focus()
        End If
    End Sub
    Private Sub TxtVC_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtVC.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtHanNo.Focus()
        End If
    End Sub
    Private Sub TxtHanNo_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtHanNo.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtMucNo.Focus()
        End If
    End Sub
    Private Sub TxtMucNo_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtMucNo.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.txtTen_KH.Focus()
        End If
    End Sub
    Private Sub txtTen_KH_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtTen_KH.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtMST.Focus()
        End If
    End Sub
    Private Sub TxtMST_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtMST.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.txtDiaChi.Focus()
        End If
    End Sub
    Private Sub txtDiaChi_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtDiaChi.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtDienThoai.Focus()
        End If
    End Sub
    Private Sub TxtDienThoai_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtDienThoai.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtFax.Focus()
        End If
    End Sub
    Private Sub TxtFax_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtFax.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtEmail.Focus()
        End If
    End Sub
    Private Sub TxtEmail_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtEmail.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.CboNganHang.Focus()
        End If
    End Sub
    Private Sub CboNganHang_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CboNganHang.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtTaiKhoan.Focus()
        End If
    End Sub
    Private Sub TxtTaiKhoan_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtTaiKhoan.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.CboQuocGia.Focus()
        End If
    End Sub
    Private Sub CboQuocGia_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CboQuocGia.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.CboKhuVuc.Focus()
        End If
    End Sub

    Private Sub CboKhuVuc_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CboKhuVuc.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.CboTinh.Focus()
        End If
    End Sub
    Private Sub CboTinh_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CboTinh.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.CboQuan.Focus()
        End If
    End Sub
    Private Sub CboQuan_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CboQuan.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.btnSave.Focus()
        End If
    End Sub
    Private Sub btnSave_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btnSave.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.btnNew.Focus()
        End If
    End Sub
    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        luu()
    End Sub
    Private Sub luu()
        ' Kiểm tra có nhập liệu chưa ?
        Dim txtMaKH = Me.txtMa_KH.Text.Trim
        Dim txtTenKH = Me.txtTen_KH.Text.Trim
        If Me.checkInput(txtMaKH, txtTenKH) Then
            sqlQuery = "SELECT ma_nhacungcap FROM tbl_nhacungcap WHERE ma_nhacungcap = '" & txtMaKH & "'"
            Dim existedMamon As Integer = moduleDatabaseConn.CheckRecordExisted(sqlQuery)
            If existedMamon = 1 Then ' Update record
                moduleConstants.MessageWarning = "Mã nhà cung cấp đã tồn tại , bạn có muốn cập nhật không  ?"
                If MessageBox.Show(moduleConstants.MessageWarning, globalVariale.msgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = MsgBoxResult.Yes Then
                    sqlQuery = "UPDATE tbl_nhacungcap "
                    sqlQuery += "SET "
                    sqlQuery += "ma_nhacungcap = '" & txtMaKH & "'"
                    sqlQuery += ", ten_nhacungcap = '" & Me.txtTen_KH.Text.Trim & "'"
                    sqlQuery += ", diachi_nhacungcap = '" & Me.txtDiaChi.Text.Trim & "'"
                    sqlQuery += ", maso_thue = '" & Me.TxtMST.Text.Trim & "'"
                    sqlQuery += ", dienthoai = '" & Me.TxtDienThoai.Text.Trim & "'"
                    sqlQuery += ", fax = '" & Me.TxtFax.Text.Trim & "'"
                    sqlQuery += ", email = '" & Me.TxtEmail.Text.Trim & "'"
                    sqlQuery += ", so_taikhoan = '" & Me.TxtTaiKhoan.Text.Trim & "'"
                    sqlQuery += ", ma_quocgia = '" & Me.CboQuocGia.Text.Trim & "'"
                    sqlQuery += ", ma_mien = '" & Me.CboKhuVuc.Text.Trim & "'"
                    sqlQuery += ", ma_tinh = '" & Me.CboTinh.Text.Trim & "'"
                    sqlQuery += ", ma_quan = '" & Me.CboQuan.Text.Trim & "'"
                    sqlQuery += ", ma_nganhang = '" & Me.CboNganHang.Text.Trim & "'"
                    sqlQuery += ", mucno = '" & Me.TxtMucNo.Text.Trim & "'"
                    sqlQuery += ", chietkhau = '" & Me.TxtCK.Text.Trim & "'"
                    sqlQuery += ", vanchuyen = '" & Me.TxtVC.Text.Trim & "'"
                    sqlQuery += ", hanno = '" & Me.TxtHanNo.Text.Trim & "'"
                    sqlQuery += ", ma_nhom = '" & Me.CboNhom.Text.Trim & "'"
                    sqlQuery += " WHERE ma_nhacungcap = '" & txtMaKH & "'"
                    Dim updated As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                    If updated = 1 Then
                        MessageBox.Show("Cập nhật thông tin thành công !")
                        sqlQuery = "SELECT * FROM tbl_nhacungcap"
                        Me.loadDanhSachNhaCungCap(sqlQuery)
                    Else
                        MessageBox.Show("Cập nhật thông tin không thành công: " & globalVariale.sqlMsgError)
                    End If
                End If
            Else
                If existedMamon = 0 Then ' Insert record
                    sqlQuery = "INSERT INTO tbl_nhacungcap "
                    sqlQuery += "(ma_nhacungcap, ten_nhacungcap,diachi_nhacungcap,maso_thue,dienthoai,fax,email,so_taikhoan,ma_quocgia,ma_mien,ma_tinh,ma_quan,ma_nganhang,mucno,chietkhau,vanchuyen,hanno,ma_nhom) "
                    sqlQuery += "VALUES "
                    sqlQuery += "("
                    sqlQuery += " '" & txtMaKH & "',"
                    sqlQuery += " '" & Me.txtTen_KH.Text.Trim & "',"
                    sqlQuery += "'" & Me.txtDiaChi.Text.Trim & "',"
                    sqlQuery += "'" & Me.TxtMST.Text.Trim & "',"
                    sqlQuery += " '" & Me.TxtDienThoai.Text.Trim & "',"
                    sqlQuery += "'" & Me.TxtFax.Text.Trim & "',"
                    sqlQuery += " '" & Me.TxtEmail.Text.Trim & "',"
                    sqlQuery += " '" & Me.TxtTaiKhoan.Text.Trim & "',"
                    sqlQuery += " '" & Me.CboQuocGia.Text.Trim & "',"
                    sqlQuery += " '" & Me.CboKhuVuc.Text.Trim & "',"
                    sqlQuery += " '" & Me.CboTinh.Text.Trim & "',"
                    sqlQuery += " '" & Me.CboQuan.Text.Trim & "',"
                    sqlQuery += " '" & Me.CboNganHang.Text.Trim & "',"
                    sqlQuery += " '" & Me.TxtMucNo.Text.Trim & "',"
                    sqlQuery += " '" & Me.TxtCK.Text.Trim & "',"
                    sqlQuery += " '" & Me.TxtVC.Text.Trim & "',"
                    sqlQuery += " '" & Me.TxtHanNo.Text.Trim & "',"
                    sqlQuery += " '" & Me.CboNhom.Text.Trim & "'"
                    sqlQuery += ")"
                    Dim inserted As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                    If inserted = 1 Then
                        MessageBox.Show("Thêm thông tin thành công !")
                        sqlQuery = "SELECT * FROM tbl_nhacungcap"
                        Me.loadDanhSachNhaCungCap(sqlQuery)
                    Else
                        MessageBox.Show("Thêm thông tin không thành công: " & globalVariale.sqlMsgError)
                    End If
                Else ' SQLExeption: existedMaQuocGia = -1
                    MessageBox.Show("Lấy dữ liệu bị lỗi: " & globalVariale.sqlMsgError, "Lấy dữ liệu", MessageBoxButtons.OK, MessageBoxIcon.Warning)
                End If
            End If
        End If
    End Sub


    Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click
        SetclearData()
        CboNhom.Focus()

    End Sub

    Private Sub btnDelete1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete1.Click
        xoa()
    End Sub
    Private Sub xoa()
        Dim txtMaKH As String = Trim(Me.txtMa_KH.Text)
        If txtMaKH = "" Then
            MessageBox.Show("Bạn chưa chọn Mã để xóa !")
        Else
            Dim txtTenKH As String = Trim(Me.txtTen_KH.Text)
            moduleConstants.MessageWarning = "Bạn có muốn xóa " & txtMaKH & "(" & txtTenKH & ") ?"

            If MessageBox.Show(moduleConstants.MessageWarning, globalVariale.msgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = MsgBoxResult.Yes Then
                Dim sqlQuery As String = "DELETE FROM tbl_nhacungcap WHERE ma_nhacungcap = '" & txtMaKH & "'"
                Dim deleting As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                If deleting = 1 Then
                    MessageBox.Show("Xóa thông tin thành công !")
                    sqlQuery = "SELECT * FROM tbl_nhacungcap"
                    Me.loadDanhSachNhaCungCap(sqlQuery)
                    SetclearData()
                Else
                    MessageBox.Show("Xóa thông tin không thành công: " & globalVariale.sqlMsgError)
                End If
            End If
        End If
    End Sub
    Private Sub frmNhaCungCap_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        moduleUtils.setDinhDangVietNam()
        Me.KeyPreview = True
        Me.loadDanhSachNhomNCC()
        Me.loadDanhSachNhomNganHang()
        Me.loadDanhSachNhomQuocGia()
        Me.loadDanhSachNhomKhuVuc()
        Me.loadDanhSachNhomTinh()
        Me.loadDanhSachNhomQuan()
        Me.loadDanhSachNhaCungCap(" SELECT * FROM tbl_nhacungcap ")
        TxtCK.Text = "0"
        TxtVC.Text = "0"
        TxtHanNo.Text = "0"
        TxtMucNo.Text = "0"

    End Sub

    Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
        Me.Close()
    End Sub
    Function checkInput(ByVal maLop As String, ByVal tenLop As String) As Boolean
        Dim result As Boolean = True
        If maLop = "" Then
            MessageBox.Show("Bạn chưa chọn Mã Khách hàng !")
            result = False
        Else
            If tenLop = "" Then
                MessageBox.Show("Bạn chưa nhập tên Khách hàng!")
                result = False
            End If
        End If
        Return result
    End Function
    Private Sub loadDanhSachNhaCungCap(ByVal sqlQuery As String)
        Me.DataGridView1.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
    End Sub
    Private Sub loadDanhSachNhomNCC()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_nhom_nhacungcap, ten_nhom_nhacungcap FROM tbl_nhom_nhacungcap ORDER BY ma_nhom_nhacungcap"
            dataNhomNCC = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboNhom.Items.Clear()
            CboNhom.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboNhom.ColumnNum = 2
            CboNhom.ColumnWidth = "100;250"
            CboNhom.HighlightBorderColor = Color.Black
            CboNhom.GridLineHorizontal = True
            CboNhom.GridLineVertical = True
            CboNhom.ItemHeight = 17
            CboNhom.DropDownHeight = 300
            CboNhom.SourceDataTable = dataNhomNCC
            CboNhom.SelectedIndex = 0
        Catch ex As Exception
            MessageBox.Show("Bạn phải nhập thông tin Nhóm nhà cung cấp")

        End Try

    End Sub
    Private Sub CboNhom_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboNhom.SelectedIndexChanged
        Me.TxtTen_Nhom.Text = Me.CboNhom.SelectedItem.Col2
        If Me.CboNhom.Text.Trim = "ALL" Then
            'sqlQuery = " select * from tbl_khachhang where ma_nhom <> 'KT' "
            sqlQuery = " select * from tbl_nhacungcap "
            Me.DataGridView1.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
        Else
            sqlQuery = " select * from tbl_nhacungcap where ma_nhom ='" & Me.CboNhom.Text & "'"
            Me.DataGridView1.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
        End If
    End Sub
    Private Sub loadDanhSachNhomNganHang()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_nganhang, ten_nganhang FROM tbl_nganhang ORDER BY ma_nganhang"
            dataNganHang = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboNganHang.Items.Clear()
            CboNganHang.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboNganHang.ColumnNum = 2
            CboNganHang.ColumnWidth = "100;250"
            CboNganHang.HighlightBorderColor = Color.Black
            CboNganHang.GridLineHorizontal = True
            CboNganHang.GridLineVertical = True
            CboNganHang.ItemHeight = 17
            CboNganHang.DropDownHeight = 300
            CboNganHang.SourceDataTable = dataNganHang
            CboNganHang.SelectedIndex = 0
        Catch ex As Exception
            MessageBox.Show("Bạn phải nhập thông tin Ngân hàng")
        End Try

    End Sub
    Private Sub CboNganHang_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboNganHang.SelectedIndexChanged
        Try
            Me.txtTen_NganHang.Text = Me.CboNganHang.SelectedItem.Col2
        Catch ex As Exception

        End Try

    End Sub
    Private Sub loadDanhSachNhomQuocGia()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_quocgia, ten_quocgia FROM tbl_quocgia ORDER BY ma_quocgia"
            dataQuocGia = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboQuocGia.Items.Clear()
            CboQuocGia.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboQuocGia.ColumnNum = 2
            CboQuocGia.ColumnWidth = "100;250"
            CboQuocGia.HighlightBorderColor = Color.Black
            CboQuocGia.GridLineHorizontal = True
            CboQuocGia.GridLineVertical = True
            CboQuocGia.ItemHeight = 17
            CboQuocGia.DropDownHeight = 300
            CboQuocGia.SourceDataTable = dataQuocGia
            CboQuocGia.SelectedIndex = 0

        Catch ex As Exception
            MessageBox.Show("Bạn phải nhập thông tin Quốc gia")

        End Try

    End Sub
    Private Sub CboQuocGia_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboQuocGia.SelectedIndexChanged
        Try
            Me.TxtTen_QuocGia.Text = Me.CboQuocGia.SelectedItem.Col2
        Catch ex As Exception

        End Try

    End Sub
    Private Sub loadDanhSachNhomKhuVuc()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_mien, ten_mien FROM tbl_mien ORDER BY ma_mien"
            dataKhuVuc = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboKhuVuc.Items.Clear()
            CboKhuVuc.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboKhuVuc.ColumnNum = 2
            CboKhuVuc.ColumnWidth = "100;250"
            CboKhuVuc.HighlightBorderColor = Color.Black
            CboKhuVuc.GridLineHorizontal = True
            CboKhuVuc.GridLineVertical = True
            CboKhuVuc.ItemHeight = 17
            CboKhuVuc.DropDownHeight = 300
            CboKhuVuc.SourceDataTable = dataKhuVuc
            CboKhuVuc.SelectedIndex = 0

        Catch ex As Exception
            MessageBox.Show("Bạn phải nhập thông tin Khu vực ")

        End Try

    End Sub
    Private Sub CboKhuVuc_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboKhuVuc.SelectedIndexChanged
        Try
            Me.TxtTen_KhuVuc.Text = Me.CboKhuVuc.SelectedItem.Col2
        Catch ex As Exception
        End Try

    End Sub
    Private Sub loadDanhSachNhomTinh()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_tinh, ten_tinh FROM tbl_tinh ORDER BY ma_tinh"
            dataTinh = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboTinh.Items.Clear()
            CboTinh.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboTinh.ColumnNum = 2
            CboTinh.ColumnWidth = "100;250"
            CboTinh.HighlightBorderColor = Color.Black
            CboTinh.GridLineHorizontal = True
            CboTinh.GridLineVertical = True
            CboTinh.ItemHeight = 17
            CboTinh.DropDownHeight = 300
            CboTinh.SourceDataTable = dataTinh
            CboTinh.SelectedIndex = 0
        Catch ex As Exception
            MessageBox.Show("Bạn phải nhập thông tin tỉnh thành")
        End Try

    End Sub
    Private Sub CboTinh_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboTinh.SelectedIndexChanged
        Try
            Me.TxtTen_Tinh.Text = Me.CboTinh.SelectedItem.Col2
        Catch ex As Exception

        End Try

    End Sub
    Private Sub loadDanhSachNhomQuan()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_quan, ten_quan FROM tbl_quan ORDER BY ma_quan"
            dataQuan = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboQuan.Items.Clear()
            CboQuan.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboQuan.ColumnNum = 2
            CboQuan.ColumnWidth = "100;250"
            CboQuan.HighlightBorderColor = Color.Black
            CboQuan.GridLineHorizontal = True
            CboQuan.GridLineVertical = True
            CboQuan.ItemHeight = 17
            CboQuan.DropDownHeight = 300
            CboQuan.SourceDataTable = dataQuan
            CboQuan.SelectedIndex = 0

        Catch ex As Exception
            MessageBox.Show("Bạn phải nhập thông tin Quận huyện")
        End Try

    End Sub
    Private Sub CboQuan_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboQuan.SelectedIndexChanged
        Me.TxtTen_Quan.Text = Me.CboQuan.SelectedItem.Col2
    End Sub

    Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
        Dim iRow As Integer = Me.DataGridView1.CurrentRow.Index
        If iRow >= 0 Then
            Me.txtMa_KH.Text = Me.DataGridView1.Item(Me.colMa.Index, iRow).Value
            Me.txtTen_KH.Text = Me.DataGridView1.Item(Me.colten.Index, iRow).Value
            Me.txtDiaChi.Text = Me.DataGridView1.Item(Me.coldiachi.Index, iRow).Value
            Me.TxtDienThoai.Text = Me.DataGridView1.Item(Me.coldt.Index, iRow).Value
            Me.TxtFax.Text = Me.DataGridView1.Item(Me.colfax.Index, iRow).Value
            Me.TxtEmail.Text = Me.DataGridView1.Item(Me.colemail.Index, iRow).Value
            Me.TxtMST.Text = Me.DataGridView1.Item(Me.colmst.Index, iRow).Value
            Me.TxtTaiKhoan.Text = Me.DataGridView1.Item(Me.colsotaikhoan.Index, iRow).Value
            '
            moduleUtils.setIndexComBo(Me.DataGridView1.Item(Me.colmaquocgia.Index, iRow).Value, Me.CboQuocGia, dataQuocGia)
            moduleUtils.setIndexComBo(Me.DataGridView1.Item(Me.colmamien.Index, iRow).Value, Me.CboKhuVuc, dataKhuVuc)
            moduleUtils.setIndexComBo(Me.DataGridView1.Item(Me.colmatinh.Index, iRow).Value, Me.CboTinh, dataTinh)
            moduleUtils.setIndexComBo(Me.DataGridView1.Item(Me.colmaquan.Index, iRow).Value, Me.CboQuan, dataQuan)
            moduleUtils.setIndexComBo(Me.DataGridView1.Item(Me.colmanganhang.Index, iRow).Value, Me.CboNganHang, dataNganHang)
            moduleUtils.setIndexComBo(Me.DataGridView1.Item(Me.colmanhom.Index, iRow).Value, Me.CboNhom, dataNhomNCC)
        End If
    End Sub

    Private Sub BtnIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnIn.Click
        FrmCrNhaCungCap.Show()
    End Sub

    Private Sub btnTimKiem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTimKiem.Click
        If Me.txtMaSearch.Text = "" And Me.txtTenSearch.Text = "" Then
            MessageBox.Show("Bạn phải nhập thông tin tìm kiếm !!!")
            Me.txtMaSearch.Focus()
        Else
            sqlQuery = "SELECT *  FROM tbl_nhacungcap "
            sqlQuery += " where ma_nhacungcap like '%" & Me.txtMaSearch.Text & "%'"
            sqlQuery += " and  ten_nhacungcap like '%" & Me.txtTenSearch.Text & "%'"
            Me.gridSearch.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
        End If
    End Sub
    Private Sub gridSearch_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles gridSearch.DoubleClick
        Me.TabMain.SelectedTab = Me.TabThongtin
        Dim iRow As Integer = Me.gridSearch.CurrentRow.Index

        Me.txtMa_KH.Text = Me.gridSearch.Item(Me.colmaS.Index, iRow).Value
        Me.txtTen_KH.Text = Me.gridSearch.Item(Me.coltenS.Index, iRow).Value
        Me.txtDiaChi.Text = Me.gridSearch.Item(Me.coldiachiS.Index, iRow).Value
        Me.TxtDienThoai.Text = Me.gridSearch.Item(Me.coldienthoaiS.Index, iRow).Value
        Me.TxtFax.Text = Me.gridSearch.Item(Me.colfaxS.Index, iRow).Value
        Me.TxtEmail.Text = Me.gridSearch.Item(Me.colemailS.Index, iRow).Value
        Me.TxtMST.Text = Me.gridSearch.Item(Me.colmstS.Index, iRow).Value
        Me.TxtTaiKhoan.Text = Me.gridSearch.Item(Me.colsotaikhoanS.Index, iRow).Value
        '
        moduleUtils.setIndexComBo(Me.gridSearch.Item(Me.colmaquocgiaS.Index, iRow).Value, Me.CboQuocGia, dataQuocGia)
        moduleUtils.setIndexComBo(Me.gridSearch.Item(Me.colmamienS.Index, iRow).Value, Me.CboKhuVuc, dataKhuVuc)
        moduleUtils.setIndexComBo(Me.gridSearch.Item(Me.colmatinhS.Index, iRow).Value, Me.CboTinh, dataTinh)
        moduleUtils.setIndexComBo(Me.gridSearch.Item(Me.colmaquanS.Index, iRow).Value, Me.CboQuan, dataQuan)
        moduleUtils.setIndexComBo(Me.gridSearch.Item(Me.colmanganhangS.Index, iRow).Value, Me.CboNganHang, dataNganHang)
        moduleUtils.setIndexComBo(Me.gridSearch.Item(Me.colmanhomS.Index, iRow).Value, Me.CboNhom, dataNhomNCC)

    End Sub

End Class


